import { Component, OnInit } from '@angular/core';
import { CusHttpServService } from '../cus-http-serv.service';
import {StoreService} from '../store-service'
@Component({
  selector: 'app-communicate-comp',
  templateUrl: './communicate-comp.component.html',
  styleUrls: ['./communicate-comp.component.css']
})
export class CommunicateCompComponent implements OnInit {
  url: string;
  routerValue: string;
  injectValue: string;
  constructor(private httpServ: CusHttpServService,
    private store: StoreService) { }

  ngOnInit() {
  }

  public httpGet () {
    console.log('this.url: ' + this.url);
    this.httpServ.get(this.url, { responseType: 'text' }).subscribe(rlt => console.log('rlt: ', rlt));
  }
  public httpPost () {
    // this.httpServ.post('/test/ng-post-test', data).subscribe((rlt: any) => console.log('post rlt', rlt.data));
  }
  public changeLoginState () {
    this.store.changeLoginState();
  }
}
